const path = require("path")
const files = require.context("./modules", false, /\.js$/)
const routerModules = {}
files.keys().forEach((key) => {
  const name = path.basename(key, ".js")
  routerModules[name] = files(key).default || files(key)
})
var values =Object.values(Object.values(routerModules));
let allRouter = []
values.map(item => {
  typeof item == 'object' && item.map(child => {
    allRouter.push(child)
  })
})
export default allRouter